package com.money.mvp_dagger_simple.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.money.mvp_dagger_simple.application.AppComponent;
import com.money.mvp_dagger_simple.application.Mapplication;

import butterknife.ButterKnife;

/**
 * Created by Money on 2017/8/25.
 */

public abstract class BaseActivity extends AppCompatActivity{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(getLayoutId());
        ButterKnife.bind(this);
        setAppComponent(Mapplication.getAppComponent());
    }

    public abstract int getLayoutId();
    public abstract void setAppComponent(AppComponent appComponent);

}
